import iconList from "@/config/systemIcons";
import {baseUrl} from "@/config/env";

export default () => {
    return {
        translate: false,
        searchLabelWidth: 100,
        excelBtn: true,
        labelWidth: 110,
        selection: true,
        tip: false,
        index: true,
        align: 'center',
        headerAlign: 'center',
        menuType: 'menu',
        menuPosition:"right",
        border: true,
        stripe: true,
        permissionBtn: {
            addBtn: 'sys:menu:add',
            editBtn: 'sys:menu:edit',
            viewBtn: 'sys:menu:info',
            delBtn: 'sys:menu:delete',
            delsBtn: 'sys:menu:deletes',
            dataRuleBtn: 'sys:dataRule:list'
        },
        column: [
            {
                label: '名称',
                span: 12,
                prop: 'label',
                width: 180,
                align: 'left'
            },
            {
                label: '类型',
                span: 12,
                prop: 'type',
                type: 'select',
                width: 60,
                dicData: [{
                    label: '菜单',
                    value: 0
                }, {
                    label: '按钮',
                    value: 1
                }],
            },
            {
                label: '父级',
                prop: 'parentId',
                span: 24,
                type: "tree",
                dicUrl:baseUrl + '/start/sysMenu/AllMenu',
                props:{

                },
                showColumn: false,
            },
            {
                label: '图标',
                type: 'icon',
                span: 12,
                prop: 'icon',
                display: true,
                width: 60,
                iconList: iconList
            },

            {
                label: '路径',
                prop: 'path',
                span: 12,
                display: true,
                align: 'left'
            },
            {
                label: '权限编码',
                span: 12,
                prop: 'code',
                width: 240,
                align: 'left'
            },
            {
                label: '前端组件',
                prop: 'component',
                span: 12,
                display: true,
                showColumn: false,
            }, {
                label: '序号',
                prop: 'sort',
                span: 12,
                type: "number",
                value: 0,
                showColumn: false,
            },
        ]
    }
}
